package com.yugu.enums;

import com.google.common.collect.Maps;

import java.util.Arrays;
import java.util.Map;

/**
 * redisKey
 * @author 31631
 *
 */
public enum RedisKeyEnum {
    GOOD_KEY("GOOD_KEY", "出库单"),
    STOCK_HOUSE_INBOUND("STOCK_HOUSE_INBOUND", "入库单"),
    STOCK_HOUSE_RETURN("STOCK_HOUSE_RETRUN", "退库单"),
    COMAPNY("COMAPNY", "公司代码"),
    EMPLOYEE("EMPLOYEE", "员工编号"),
    ;
    private String code;
    private String desc;

    private static final Map<String, RedisKeyEnum> MAPS = Maps.uniqueIndex(
            Arrays.asList(RedisKeyEnum.values()),
            RedisKeyEnum::getCode
    );

    public static RedisKeyEnum get(String code) {
        return MAPS.get(code);
        
    }

    
	private RedisKeyEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}


	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
    
    
}
